def main1():
    a = 1
    print(a)
    print(type(a))
    b = 3.5
    print(b)
    print(type(b))
    c = "123"
    print(c)
    print(type(c))
    d = True
    print(d)
    print(type(d))


def main2():
    a = 123
    hex_a = hex(a)
    print(hex_a)
    oct_a = oct(a)
    print(oct_a)
    int_a = int(a)
    print(int_a)


def main3():
    sum = 0
    n = 1
    while n < 51:
        a = 2 * n - 1
        sum = sum + a
        n = n + 1
    print(sum)


def main4():
    n = 1
    while n < 10:
        a = 1
        while a < n:
            c = a * n
            print("%i*%i=%i\t" % (a, n, c), end=" ")
            a = a + 1
        if a == n:
            c = a * n
            print("%i*%i=%i\t" % (a, n, c))
            print("\n")
            n = n + 1


def main5():
    x = int(input('请输入一个数：'))
    if x >= 0:
        print(x, '的二进制表示为:', bin(x))
        print('二进制中表示1的个数为', bin(x).count('1'))
    else:
        print(x, '的二进制表示为:', bin(x))
        print('二进制中表示1的个数为', 64 - bin(-x - 1).count('1'))


